package com.nuoniu.sibanyun.mapper.so;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.bo.UnExecutedBo;
import com.nuoniu.sibanyun.entity.so.VSaleDeliveryDetail;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 销售发货单明细 Mapper 接口
 * </p>
 *
 * @author 小啊刚
 * @since 2020-12-07
 */
public interface VSaleDeliveryDetailMapper extends BaseMapper<VSaleDeliveryDetail> {

    @Select("select * from scs_delivery_detail where source_voucher_id=#{id}")
    List<VSaleDeliveryDetail> getBySourceId(Long id);

    /**
     * 获取 采购退货 未执行数量 情况
     * @param companyId
     * @param accountId
     * @param inventoryIds
     * @return
     */
    List<UnExecutedBo> getRetUnExecuteQuantity(Integer companyId, Integer accountId , String inventoryIds,String warehouseIds);
}
